// import request from './request.js'

const request = {
	get: url => {
		return new Promise((resolve, reject) => {
			uni.request({
				url: `https://files.yzsheng.com${url}?t=${new Date().getTime()}`,
				success: res => {
					resolve(res)
				},
				fail: err => {
					reject(err)
				}
			})
		})
	}
}

// 静态Json数据
const staticDatas = {
	//规格
	specification() {
		return request.get('/json/Bussiness/Brands/specification.json')
	},
	//品牌所有平级
	brandAll() {
		return request.get('/json/Bussiness/Brands/brand.json')
	},
	//品牌所有平级分组
	brandAllGroup() {
		return request.get('/json/Bussiness/Brands/brand_group.json')
	},
	//品牌所有的平级加上下面所有车子的数量
	brandCount() {
		return request.get('/json/Bussiness/Brands/brand_count.json')
	},
	//品牌所有加平级加上下面所有车子的数量分组
	brandCountGroup() {
		return request.get('/json/Bussiness/Brands/brand_count_group.json')
	},
	//品牌系列车子，车子颜色
	brandData() {
		return request.get('/json/Bussiness/Brands/brand_data.json')
	},
	//品牌系列车子，车子颜色——分组
	brandDataGroup() {
		return request.get('/json/Bussiness/Brands/brand_data_group.json')
	},

	//地区
	regionalAll() {
		return request.get('/json/Bussiness/Region/region.json')
	},
	//地区省份
	regionalProvince() {
		return request.get('/json/Bussiness/Region/region_province.json')
	},
	//地区省份分组
	regionalProvinceGroup() {
		return request.get('/json/Bussiness/Region/region_province_group.json')
	},
	//地区市级
	regionalCity() {
		return request.get('/json/Bussiness/Region/region_city.json')
	},
	//地区市级分组
	regionalCityGroup() {
		return request.get('/json/Bussiness/Region/region_city_group.json')
	},
	//地区区县
	regionaldistrict() {
		return request.get('/json/Bussiness/Region/region_district.json')
	},
	//地区区县分组
	regionaldistrictGroup() {
		return request.get('/json/Bussiness/Region/region_district_group.json')
	},
	//分组
	regionalGroup() {
		return request.get('/json/Bussiness/Region/region_group.json')
	},
	//数据源-我们应该用不上
	regionalData() {
		return request.get('/json/Bussiness/Region/region_data.json')
	},
	//地区市级分组经纬度
	regionalCityGroupNew() {
		return request.get('/json/Bussiness/Region/region_city_group_new.json')
	},

	// 海报数据
	getPosters() {
		return request.get('/json/Bussiness/Other/posters.json')
	},

	// 引导页图片数据
	getGuideImg() {
		return request.get('/json/Bussiness/Other/guide.json')
	},
	//车辆详情
	getCarDetail() {
		return request.get('/json/Bussiness/carDetail/carDetail.json')
	},
	//获取快递公司信息
	getexpresscompany() {
		return request.get('/json/Bussiness/Logistics/expresscompany.json')
	},
	//获取车型配置参数
	CarViewParmeterJson(carId) {
		return request.get('/json/Bussiness/CarViewParmeterJson/' + carId + '.json')
	},
	//获取按保养类型分类商品
	MaintenanceTypeAndGoods() {
		return request.get('/json/client/MaintenanceTypeAndGoods3.json')
	},
	//保险公司
	insurance() {
		return request.get('/json/insurance/insurance.json')
	},
	//获取车型配置参数
	CarViewParmeterJson(carId) {
		return request.get('/json/Bussiness/CarViewParmeterJson/' + carId + '.json')
	},
	//订单倒计时时间参数
	getTimeJson() {
		return request.get('/json/client/time.json')
	},
	//客服电话
	getServiceNumber() {
		return request.get('/json/client/base.json')
	}
}

export default staticDatas
